/*
 * Copyright 2003-2007 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

package com.colony.mime;

import java.io.*;
import java.util.*;

/**
 *  The Pipe class provides a single class which acts as a Pipe between two threads.
 *  It returns an MimeInputStream and MimeOutputStream for each side of the Pipe.  
 *  The Mime streams offer additional methods to support
 */
public class MimeInputSource 
extends MimeInputStream
{
   InputStream _input;

   public MimeInputSource( InputStream input )
   {
      _input = input;
   }

   public MimeInputSource( InputStream input, HashMap headers )
   {
      super( headers );
      _input = input;
   }

	public MimeInputSource( InputStream input, MimeInputStream headerSource )
	{
		super( headerSource.hashTable() );
		_input = input;
	}

   public int read()
   throws IOException
   {
      return _input.read();
   }

   public int read(byte[] b)
      throws IOException
   {
      return _input.read( b );
   }

   public int read(byte[] b, int off, int len)
      throws IOException
   {
      return _input.read( b,off,len );
   }

   public long skip(long n)
      throws IOException
   {
      return _input.skip( n );
   }

   public int available()
   throws IOException
   {
      return _input.available();
   }

   public void close()
   throws IOException
   {
      _input.close();
   }

   public void mark(int readlimit)
   {
      _input.mark( readlimit );
   }

   public void reset()
   throws IOException
   {
      _input.reset();
   }

   public boolean markSupported()
   {
      return _input.markSupported();
   }

}
